<template>
  <view>
    <!-- <strategy-header></strategy-header> -->
  <swiper indicator-dots circular autoplay>
  	<swiper-item v-for="(image, index) in images" :key="image.index">
  		<image :src="image" mode="" ></image>
  	</swiper-item>
	</swiper>
    <view class="gallery_drawing" align="left">
      <view class="gallery-van-tab-a">
        <view class="" v-for="strategy in this.strategyList" :key="strategy.constructionStrategyId" style="margin-top: 10px">
          <image src="https://img.yzcdn.cn/vant/cat.jpeg" fit="cover" style="width: 160px; height: 150px;"  @click="btnClick(strategy.constructionStrategyId)"></image>
          <view class="gallery-van-tab-a-content">
            <view>
              <view align="left" style="font-size: 0.8rem;margin: 0;padding: 0.2rem 0">{{strategy.constructionStrategyTitle}}</view>
            </view>
            <view align="left" class="gallery-van-tab-b-contents">
              <view class="van-tab-b-contents">
                 <image round  src="https://img.yzcdn.cn/vant/cat.jpeg" style="position: absolute; width: 20px; height: 20px; border-radius: 50px;"/>
                <text style="font-size: 0.4rem;margin-left: 1.5rem">{{strategy.supplierInfo.shopsName}}</text>
              </view>
              <view class="van-tab-b-contents">
                <van-icon name="like-o" style="position: absolute;left: 0;top: 0.1rem"/>
                <text class="block-list-likes" style="font-size: 0.8rem;margin-left: 1.2rem">{{strategy.constructionStrategyGood}}</text>
              </view>
            </view>
          </view>
        </view>
      </view>
    </view>

    <view class="gallery_drawing" align="right" style="float: right">
      <view class="gallery-van-tab-a">
        <view class="" v-for="strategy in this.introductionVideoList" :key="strategy.caseId" style="margin-top: 10px">
          <image :src="strategy.casePicurl" fit="cover" style="width: 160px; height: 150px;"/>
          <view class="gallery-van-tab-a-content">
            <view>
              <view align="left" style="font-size: 0.8rem;margin: 0;padding: 0.2rem 0">{{strategy.infoDesc}}</view>
            </view>
            <view align="left" class="gallery-van-tab-b-contents">
              <view class="van-tab-b-contents">
                <image round style="position: absolute; width: 20px; height: 20px; border-radius: 50px;" :src="strategy.avatar"/>
                <text style="font-size: 0.4rem;margin-left: 1.5rem">{{strategy.shopsName}}</text>
              </view>
              <view class="van-tab-b-contents">
                <van-icon name="like-o" style="position: absolute;left: 0;top: 0.1rem"/>
                <text class="block-list-likes" style="font-size: 0.8rem;margin-left: 1.2rem">{{strategy.constructionStrategyGood}}</text>
              </view>
            </view>
          </view>
        </view>
      </view>
    </view>

  </view>
</template>

<script>

  import StrategyHeader from './index/Strategy_Index_Header'
  import { selectStrategyList,selectIntroductionVideo } from "@/api/constructionTeam/strategy.js";

  export default {

    data(){
      return{
        drawa : 4,
        strategyList:[],
        introductionVideoList:[],
		images: [
		            '../../static/logo.png',
		            '../../static/logo.png',
		          ],
      }
    },
    created() {
      this.getStrategyList();
      this.getSelectIntroductionVideo();
    },
    components: {
    StrategyHeader
    },
    methods: {
      btnClick(strategyId) {
        //this.$router.push({ path:'/strategy_details',query:{strategyId:strategyId}})
		uni.navigateTo({
			url:"/pages/index_constructionstrategy/strategy_details?strategyId="+strategyId
		})
      },
      getStrategyList(){
        selectStrategyList().then((res) =>{
          console.log(res)
          this.strategyList = res.data.data;
        })
      },
      getSelectIntroductionVideo(){
        selectIntroductionVideo().then((res)=>{
            console.log(res,"123456789")
            this.introductionVideoList = res.data.data;
          })
      },

    }

  }
</script>

<style scoped>
	swiper image{
		width: 100%;
	}
  .gallery_drawing{
    width: 45%;
    display: inline-block;
  }
  .gallery-van-tab-a{
    padding: 0.5rem;
    display: inline-block;
  }
  .gallery-van-tab-aa{
    padding: 0.5rem;
    width: 45%;
    display: inline-block;
  }
  .gallery-van-tab-b-contents{
    position: relative;
  }
  .van-tab-b-contents{
    display :inline-block;
    position: relative;
  }
  .block-content-p p{
    padding: 0.4rem;
  }

</style>
